import { Matrix } from "common/geom";
/**
 * 库项目类型。
 */
export enum ItemType {
    Folder,
    Armature,
    Texture,
    TextureAtlas,
    SubTexture
}
/**
 * 骨架类型。
 */
export enum ArmatureType {
    Stage,
    Armature,
    MovieClip
}
/**
 * 显示对象类型。
 */
export enum DisplayType {
    Texture,
    Armature,
    Mesh,
    BoundingBox,
    Path
}
/**
 * 边界框类型。
 */
export enum BoundingBoxType {
    Rectangle,
    Ellipse,
    Polygon
}
/**
 * 混合类型。
 */
export enum BlendMode {
    Normal,
    Add
}
/**
 * 时间轴类型。
 */
export enum TimelineType {
    Action,
    ZOrder,
    X, Y,
    Rotation, Skew,
    ScaleX, ScaleY,
    DisplayIndex,
    ColorTransform,
    FFD,
    AnimationStateTime, AnimationStateWeight
}
/**
 * 补间类型。
 */
export enum TweenType {
    None,
    Line,
    Custom,
    Type
}
/**
 * 舞台类型。
 */
export enum StageType {
    Armature,
    Animation
}
/**
 * 组件类型。
 */
export enum ComponentType {
    History = 10,
    Outline,
    Welcome,
    Document,
    Library,
    Scene,
    ZOrder,
    Property,
    Color,
    Animation,
    Timeline,
    Curve
}
/**
 * 
 */
export type Notification = {
    type: MNotificationType | VNotificationType | CNotificationType,
    data: any,
    target: any
};
/**
 *
 */
export const defaultArmatureName = "armature";
export const defaultBoneName = "bone";
export const defaultSlotName = "slot";
/**
 * 
 */
export type LoginClientType = "DragonBones:4.5";
export enum LoginType {
    Normal = 1,
    Clean = 2
}
/**
 * Local vo.
 */
export type LoginVO = { account: string, password: string, client: LoginClientType, clientID: string, type: LoginType };
export type LogoutVO = { uid: number, client: LoginClientType, clientID: string };
/**
 * Remote vo.
 */
export type LoginHeaders = { timestamp: string, signature: string, client: LoginClientType };
export type LoginSend = { account: string, password: string, client_id: string, type: LoginType };
export type LoginLoad = {};
export type LogoutHeaders = { timestamp: string, signature: string, client: LoginClientType };
export type LogoutSend = { uid: number, client_id: string };
export type LogoutLoad = {};
/**
 *
 */
export interface IName {
    name: string;
}
/**
 * 数据变更类通知。
 */
export enum MNotificationType {
    None = 10000,
    // 应用数据
    // ==========================================================================================
    ApplicationOpenDocument,
    ApplicationCloseDocument,
    ApplicationActiveDocumentChange,
    // 文档
    // ==========================================================================================
    DocumentFrameRateChange,
    DocumentVersionChange,
    DocumentNameChange,
    DocumentBackgroundColorChange,
    DocumentSizeChange,
    DocumentAuthorChange,
    DocumentDescriptionChange,
    DocumentSave,
    // 库
    // ==========================================================================================
    LibraryAddItem,
    LibraryRemoveItem,
    // 项目
    // ==========================================================================================
    ItemNameChange,
    ItemParentChange,
    ItemSelect,
    ItemUnSelect,
    // 舞台
    // ==========================================================================================
    StageTypeChange,
    StageVisibleChange,
    StageScaleChange,
    StageMove,
    StageResize,
    PointerDown,
    PointerMove,
    PointerUp,
    InstanceHover,
    InstanceUnHover,
    InstanceSelect,
    InstanceUnSelect,
    // 舞台动画
    // ==========================================================================================
    PlayheadChange,
    TimelineSelect,
    TimelineUnSelect,
    FrameSelect,
    FrameUnSelect,
    // 骨架
    // ==========================================================================================
    ArmatureTypeChange,
    ArmatureFrameRateChange,
    ArmatureNameChange,
    ArmatureAABBChange,
    ArmatureAddBone,
    ArmatureRemoveBone,
    ArmatureAddSlot,
    ArmatureRemoveSlot,
    // 骨骼
    // ==========================================================================================
    BoneInheritChange,
    BoneLengthChange,
    BoneTransformChange,
    BoneNameChange,
    BoneParentChange,
    BoneVisibleChange,
    BoneSelectableChange,
    BoneSelectChange,
    BoneOpenedChange,
    // 插槽
    // ==========================================================================================
    SlotZOrderChange,
    SlotDisplayIndexChange,
    SlotBlendModeChange,
    SlotNameChange,
    SlotColorChange,
    SlotParentChange,
    SlotVisibleChange,
    SlotSelectableChange,
    SlotSelectChange,
    SlotOpenedChange,
    // 皮肤
    // ==========================================================================================
    SkinAdd,
    SkinRemove,
    SkinNameChange,
    // 附件
    // ==========================================================================================
    DisplayAdd,
    DisplayRemove,
    DisplayNameChange,
    DisplayTransformChange,
    DisplayPivotChange,
    DisplayTextureChange,
    DisplayArmatureChange,
    // 动画
    // ==========================================================================================
    AnimationAdd,
    AnimationRemove,
    AnimationPlayTimesChange,
    AnimationScaleChange,
    AnimationNameChange,
    // 时间轴
    // ==========================================================================================
    TimelineScaleChange,
    TimelineOffsetChange,
    // 测试
    // ==========================================================================================
    TestA,
    TestB,
    TestC,
    TestD
}
/**
 * 视图交互通知。
 */
export enum VNotificationType {
    None = 20000,
    // 主动
    // ==========================================================================================
    NewDocument,
    HelpMenu,
    Login,
    LicenceLogout,
    // 被动
    // ==========================================================================================
    // 测试
    // ==========================================================================================
    TestA,
    TestB,
    TestC,
    TestD
}
/**
 * 通用命令通知。
 */
export enum CNotificationType {
    None = 30000,
    Initial,
    ApplicationStartup,
    NewDocument,
    OpenDocument,
    Login,
    LicenceLogout,
    // 测试
    // ==========================================================================================
    TestA,
    TestB,
    TestC,
    TestD
}
